﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Xpo;
using Zero.DataLayer.Donnees.Tarifs;

namespace Zero.DataLayer.Donnees
{
    public class XpoPlanTv: XPBaseObject
    {
          public XpoPlanTv()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

          public XpoPlanTv(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        private Guid _Oid;
        [Key]
         public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }


        private string _Name;
        public string Name
        {
            get { return _Name; }
            set { SetPropertyValue("Name", ref _Name, value); }
        }



        private int _NombreSig;
        public int NombreSig
        {
            get { return _NombreSig; }
            set { SetPropertyValue("NombreSig", ref _NombreSig, value); }
        }


        private XpoCompaign _Compaign;
        [Aggregated, Association("XpoCompaign-PlanTvs")]
        public XpoCompaign Compaign
        {
            get { return _Compaign; }
            set { SetPropertyValue("Compaign", ref _Compaign, value); }
        }


        [Association("XpoPlanTV-Signalitique")]
        public XPCollection<Signalitique> Signalitiques
        {
            get { return GetCollection<Signalitique>("Signalitiques"); }
        }



        [Aggregated, Association("XpoPlanTV-XpoInsertionTV")]
        public XPCollection<XpoInsertionTV> XpoInsertionTVs
        {
            get { return GetCollection<XpoInsertionTV>("XpoInsertionTVs"); }
        }


        [ Association("XpoPlanTV-XpoMapSupportTarifTv")]
        public XPCollection<XpoMapSupportTarifTv> XpoMapSupportTarifTvs
        {
            get { return GetCollection<XpoMapSupportTarifTv>("XpoMapSupportTarifTvs"); }
        }
    
    }







    public class XpoMapSupportTarifTv : XPBaseObject
    {
        public XpoMapSupportTarifTv()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public XpoMapSupportTarifTv(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }


        private Guid _Oid;

        [Key]
        public Guid Oid
        {
            get { return _Oid; }
            set { SetPropertyValue("Oid", ref _Oid, value); }
        }


        private XpoSupportTV _supportTV;
        //[Association("XpoMapSupportTarifTv -XpoSupportTv")]
        public XpoSupportTV supportTV
        {
            get { return _supportTV; }
            set { SetPropertyValue("supportTV", ref _supportTV, value); }
        }





        private XpoTarifTv _TarifTv;
       // [Association("XpoMapSupportTarifTv -XpoTarifTv")]
        public XpoTarifTv TarifTv
        {
            get { return _TarifTv; }
            set { SetPropertyValue("TarifTv", ref _TarifTv, value); }
        }





        private XpoPlanTv _planTv;
        [ Association("XpoPlanTV-XpoMapSupportTarifTv")]
        public XpoPlanTv planTv
        {
            get { return _planTv; }
            set { SetPropertyValue("planTv", ref _planTv, value); }
        }
    }
}
